from dubbo_client import ApplicationConfig
from dubbo_client.registry import ZookeeperRegistry


config = ApplicationConfig('test_rpclib')
service_interface = 'com.daikuan.platform.message.api.PushApi'
registry = ZookeeperRegistry('172.16.0.142:2185', config)
user_provider = DubboClient(service_interface, registry, version='1.0')
for i in range(1000):
    try:
        print user_provider.sendPush({u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'})
    except DubboClientError, client_error:
        print client_error